<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>汽车4S店客服管理系统所用用户列表页面</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="汽车,4S店,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" type="text/css" href="CSS/reMainPage.css"> 
	<link rel="stylesheet" type="text/css" href="CSS/allUser.css"> 
  </head>
  
  <body>
    <% 
    	request.setCharacterEncoding("utf-8");
    	response.setHeader("Content-type", "text/html;charset=UTF-8");
    	response.setCharacterEncoding("UTF-8"); 
    %>
    <%
    	String name=(String)session.getAttribute("name"); 
    	String ident=(String)session.getAttribute("ident");
    	if(name==null||name==""||ident==null||ident=="")
    	{
    		response.sendRedirect("index.jsp");
    	}
     %>
    <div class="allbody">
    	<div class="headbody">
    		<div class="maintitle">汽车4S店客服管理系统</div>
    	</div>
    	<div class="mylist" id="mylist">
    		<ul class="prolist">
    			<li><a href="userList">车型信息</a></li>
    			<li><a href="user">个人信息</a></li>
    			<li>
    				<c:if test="${ident!='职工'&&ident!='管理员'}">
    					车型保养维修
    				</c:if>
    			</li>
    			<li>
    				<c:if test="${ident=='用户'}">
    					客服
    				</c:if>
    			</li>
    			<li>
    				<c:if test="${ident!='职工'&&ident!='管理员'}">
    					个人订单
    				</c:if>
    			</li>
    			<c:if test="${ident=='职工'||ident=='管理员'}">
    				<li><a href="pendTask">待处理任务</a></li>
    				<li>增加车型</li>
    				<li>车型试驾订购</li>
    				<li>车型维修保养</li>
    				<li>订单处理</li>
    				<li>总订单</li>
    			</c:if>
    			<c:if test="${ident=='管理员'}">
    				<li>职工信息</li>
    				<li>用户信息</li>
    			</c:if>
    		</ul>
    	</div>
    	<div class="carmain">
    		<div class="username">
    			欢迎登陆,<%=name%><%=ident%>
    		</div>
    		<div class="closelogin">
    			<a href="javascript:void(0);">退出登陆</a>
    		</div>
    		<div class="showMyMess">
    			<c:if test="${sessionScope.all_user==null}">
    				<div class="noUserMess">暂无任何用户信息</div>
    			</c:if>
    			<c:if test="${sessionScope.all_user!=null}">
	    			<div class="findUser">
	    				<span>按条件来搜索用户：</span>
	    				<input type="text" >
	    				<input type="button" value="搜索">
	    			</div>
	    			<div class="getUser">
	    				<div class="userTitle">
	    					<p>用户编号</p>
	    					<p>用户昵称</p>
	    					<p>用户真实姓名</p>
	    					<p>用户性别</p>
	    					<p>用户电话</p>
	    					<p>用户身份证号</p>
	    					<p>用户邮箱</p>
	    					<p>重置密码</p>
	    					<p>删除用户</p>
	    				</div>
	    				<div class="userMess">
		    				<c:forEach items="${sessionScope.all_user}" var="each_User">
		    					<div class="eachUserMess">
			    						<p>${each_User.USER_ID}</p>
			    						<p>${each_User.USER_NAME}</p>
			    						<p>${each_User.TRUE_NAME}</p>
			    						<p>${each_User.USER_SEX}</p>
			    						<p>${each_User.USER_PHONE}</p>
			    						<p>${each_User.USER_IDENT}</p>
			    						<p>${each_User.USER_MAIL}</p>
			    						<p><input type="button" value="重置密码"></p>
			    						<p><input type="button" value="删除用户"></p>
		    					</div>
		    				</c:forEach>
	    				</div>
	    			</div>
	    		</c:if>
    		</div>
    	</div>
    </div>
    
    <script type="text/javascript"  src="JS/jquery-3.1.0.js"></script>
	<script type="text/javascript"  src="JS/reMainPage.js"></script>
	<script type="text/javascript"  src="JS/allUser.js"></script>
  </body>
</html>
